<template>
  <div class="modal" v-if="value == 'show'">
    <div class="modal-inner">
      <div class="modal-bd"><slot></slot></div>
      <div class="modal-ft ta-c bd-t">
        <div class="weui-flex">
          <div class="weui-flex__item bd-r pd" @tap="onCancel">取消</div>
          <div class="weui-flex__item pd c-primary" @tap="onOk">确定</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    value: [String]
  },
  data () {
    return {
      isShow: this.value
    }
  },
  methods: {
    onCancel () {
      this.$emit('input', 'cancel')
    },
    onOk () {
      this.$emit('input', 'ok')
    },
  },
}
</script>

<style scoped lang="less">
@import '../assets/less/var.less';
</style>
